<?php
/**
 * ===============================================
 * 版权所有 2019-2050 青岛铁锤科技有限公司，并保留所有权利。
 * 网站地址: http://www.huaxianling.com
 * ===============================================
 * Author: Alex
 * Created Time: 2019/7/3 9:44
 * Modified Time: 2019/7/3 9:44
 * Version: 2.0
 */
namespace App\Lib\Auth;
use App\Modules\System\Services\OperateService;
use Flower\Auth\Contracts\OperateAuth as OperateAuthContract;
use Flower\Core\Http\Request;

class OperateAuth implements OperateAuthContract
{
     private $operateService;
     private $request;
     public function __construct(OperateService $operateService,Request $request)
     {
         $this->operateService = $operateService;
         $this->request = $request;
     }
    /**
     * 校验用户操作权限
     * @param int|string $user_id 用户ID
     * @param int|string $rule 规则name
     * @return boolean 是否成功
     */
    public function check($user_id, $rule)
    {
    	return true;
//    	if($this->request->has('store_id')){
//	    	return $this->operateService->checkAuth($user_id,$this->request->store_id,$rule);
//	    }else{
//    		return true;
//	    }
    }
}